﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GeCo_MenuPrincipal
{
    public class CHerbivore : CEtreVivant
    {

        public CHerbivore(int index)
        {
            
            int sexeAleatoire = 0;

            this.Id = CEtreVivant.IdCount;
            CEtreVivant.IdCount++;
            this.Espece = Program.conteneur.ListeIndividus[index].TypeEspece;
            this.libelle = Program.conteneur.ListeIndividus[index].NomEspece;
            this.EsperenceVieMax = Convert.ToInt32(Program.conteneur.ListeIndividus[index].EsperenceVieMax);
            this.VitesseDeplacement = Convert.ToInt32(Program.conteneur.ListeIndividus[index].VitesseDeplacement);
            this.especePrefere = Program.conteneur.ListeIndividus[index].EspecePrefere;
            this.age = 0;
            this.NiveauFaim = Convert.ToInt32(Program.conteneur.ListeIndividus[index].NiveauFaimMax);
            this.NiveauFaimMax = Convert.ToInt32(Program.conteneur.ListeIndividus[index].NiveauFaimMax);
            this.Libido = Convert.ToInt32(Program.conteneur.ListeIndividus[index].LibidoMax);
            this.LibidoMax = Convert.ToInt32(Program.conteneur.ListeIndividus[index].LibidoMax);
            this.AgeDebutReprod = Convert.ToInt32(Program.conteneur.ListeIndividus[index].AgeDebutReprod);
            this.AgeFinReprod = Convert.ToInt32(Program.conteneur.ListeIndividus[index].AgeFinReprod);
            this.DejaDeplace = false;

            sexeAleatoire = CNoyau.R.Next(2);
            if (sexeAleatoire == 0)
            { this.Sexe = false; }
            else { this.Sexe = true; }
        }
        
    }
}
